home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / ABox 1.9.5 / ABox info... / About the ABox... / Programming Info / 2-Modifying source / 2-Modifying source.rsrc / TEXT_229_instantiate the ABox.txt < prev    next >
Encoding:
Text File  |  1994-07-13  |  450 b   |  16 lines

  1. When you are ready (well, when your application is ready) to create an ABox instance, you can do it in the normal C++ manner via the new operator.
  2.  
  3. ABox    *myABox = NULL;
  4.  
  5. //...your code does some stuff
  6.  
  7. //...your code does more stuff
  8.  
  9. //...your code wants to create an ABox
  10. myABox = new ABox;
  11. if (!myABox)
  12.     return MemError();
  13.  
  14. //...do what you have to
  15.  
  16. This is fairly elementary. The ABox constructor will initialize all of the default values for you.